Skip to content

feat(proto): add KpRotation + KpDeletion task variants + regen xmtp_proto - #3813

Closed
insipx wants to merge 1 commit into
insipx/taskrunner-recurrencefrom
insipx/kp-consumers-proto
Closed

feat(proto): add KpRotation + KpDeletion task variants + regen xmtp_proto#3813
insipx wants to merge 1 commit into
insipx/taskrunner-recurrencefrom
insipx/kp-consumers-proto

Conversation

@insipx

@insipx insipx commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Stacked on #3806 (generic TaskRunner recurrence). Proto-only + minimal arms.

Adds KpRotation (tag 5) and KpDeletion (tag 6) to the xmtp.mls.database.Task oneof — two recurring singleton tasks for key-package maintenance. Empty payloads give each a stable data_hash so PullInDeadline (tag 4, from #3806) can target them.

🤖 Generated with Claude Code

Note

Add KpRotation and KpDeletion task variants to proto and worker

  • Adds KpRotation (tag 5) and KpDeletion (tag 6) as new oneof variants to the Task message in xmtp.mls.database.rs, with generated serde implementations.
  • In tasks.rs, the worker's run loop now matches on these new variants, logs a warning that the handler has not landed yet, and deletes the task from the database.

Macroscope summarized 395893d.

…roto

Empty payloads give each recurring singleton a stable data_hash for
PullInDeadline targeting. Minimal arms keep xmtp_mls compiling standalone;
real handlers land with the KP-consumer implementation.

gen/ remains regenerated AHEAD of the upstream proto pin (xmtp/proto#339
carries all three messages); proto_version gets bumped to its merge SHA.
@claude

claude Bot commented Jul 2, 2026

Copy link
Copy Markdown

Claude finished @insipx's task —— View job


PR Review

  • Read changed files
  • Analyze implementation
  • Provide review feedback

Review Summary (2026-07-02 17:48 UTC)

This PR cleanly adds two new recurring task variants for key-package maintenance. The implementation is minimal and appropriately structured as a proto-only change with placeholder handlers.

Key observations:

Proto structure is sound — Empty message definitions (KpRotation {} and KpDeletion {}) correctly produce stable data_hash values via proto encoding, enabling the PullInDeadline mechanism to target these singletons

Safe dispatch handling — Lines 395-404 in tasks.rs provide appropriate warn-and-delete behavior for these task variants before real handlers land

Follows established patterns — Matches the approach used for PullInDeadline (tag 4) from the base PR

No critical issues found. The minimal dispatch arms appropriately prevent crashes while keeping xmtp_mls buildable. Since the PR description states "the real handlers land in the next PR of the stack," this is the expected state.

Minor observations:

  • No test coverage for the new variants, but this is acceptable given they're placeholder arms that just log + delete
  • The #[cfg_attr(not(test), expect(dead_code))] on TaskOutcome::RescheduleAt (line 28) will correctly self-clean when production code constructs it in the follow-up PR
  • Proto regeneration produces expected boilerplate in xmtp.mls.database.serde.rs (+172 lines of serialize/deserialize implementations)

@codecov

codecov Bot commented Jul 2, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.47%. Comparing base (01bd75a) to head (395893d).

Files with missing lines Patch % Lines
crates/xmtp_mls/src/worker/tasks.rs 0.00% 2 Missing ⚠️
Additional details and impacted files
@@                       Coverage Diff                        @@
##           insipx/taskrunner-recurrence    #3813      +/-   ##
================================================================
+ Coverage                         84.44%   84.47%   +0.03%     
================================================================
  Files                               409      409              
  Lines                             60408    60410       +2     
================================================================
+ Hits                              51009    51029      +20     
+ Misses                             9399     9381      -18     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@insipx

insipx commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

Folded into #3805 — both proto regens now ship in one PR (tags 4, 5, 6 + minimal arms).

@insipx insipx closed this Jul 2, 2026
@insipx
insipx deleted the insipx/kp-consumers-proto branch July 2, 2026 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant